
import actions from '../action/count';
import CONSTANT from '../constant/count';

const countTableList = [];
const countPage = {
  page: 0,
  size: 20,
  totalElement: 0,
};

export default {
  actions,
  state: {
    countTableList,
    countPage,
  },
  mutations: {
    [CONSTANT.COUNT_GET_TABLE_LIST_SUCCESS](state, { page, publicPushesResponse }) {
      state.countTableList = publicPushesResponse;
      state.countPage = {
        ...state.countPage,
        page: page.currentPage,
        size: page.pageSize,
        totalElement: page.totalElement,
      };
    },
    [CONSTANT.COUNT_GET_TABLE_LIST_ERROR](state) {
      state.countTableList = [];
      state.countPage = countPage;
    },
  },
  getters: {
    // [CONSTANT.WOA_GETTER_LIST](state) {
    //   return state.woaList;
    // },
  },
};
